package com.eobjectsoft.etranslator;

import java.util.ResourceBundle;
import org.osgi.framework.Bundle;


public class ETranslatorResources
{
	private static final String BUNDLE_KEY = "com.eobjectsoft.etranslator.ETranslatorResources";
    private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_KEY);

    public static ResourceBundle getResourceBundle()
    {
        return RESOURCE_BUNDLE;
    }

    public static Bundle getBundle()
    {
        return ETranslatorPlugin.getDefault().getBundle();
    }

    public static String getString(String key)
    {
    	return getString(getResourceBundle(), key);
    }

    public static final String getString(ResourceBundle bundle, String key)
    {
    	if (bundle != null)
        	return bundle.getString(key);
        else
            return key;
    }

    
}
